#include <stdio.h>  

void strcopy(char[], char[]); /*expects two arrays of chars*/

int main()
{
#define LSIZE 81
    char message[LSIZE];    /*enough storage for 80 characters plus '\0'*/
    char newMessage[LSIZE]; /*enough storage for a copy of message*/

    printf("Enter a sentence: \n");
    gets(message);

    strcopy(newMessage, message); /*pass two array addresses*/

    puts(newMessage);

    return 0;
}

/*copy string2 to string1*/
void strcopy(char string1[], char string2[]) /*two arrays are passed*/
{
    int i = 0; /*i will be used as a subscript*/

    while (string2[i] != '\0') /*check for the end-of-string*/
    {
        string1[i] = string2[i]; /*copy the element to string1*/
        i++;
    }
    string1[i] = '\0'; /*terminate the copied string*/
}